<?php
/*
* @Desc 模板类
* @Auth 端杰
* @Date 2015-2-26
**/
namespace Act;
use Act\Base;
class Template extends Base{
	public function doGet(){
		$tpl=get('tpl');
		if(!$tpl||$tpl==''){
			$tpl='overview.php';
		}
		$pagelist='';//$pagelist=$this->getTemplatePageBtns(0,0);
		$headerTitle='';
		/*
		 $subNav=[
				['title'=>'子导航1','url'=>'#'],
				['title'=>'子导航2','url'=>'#','active'=>true],
				['title'=>'子导航3','url'=>'#']
			]
		*/
		$subNav=[];
		$topNavSelectIndex=1;
		$leftMenuSelectIndex=1;
		switch($tpl){
			case 'overview.php':
				$headerTitle='数据总览';
				break;
			case 'storeMgr.php':
				$headerTitle='商户管理';
				$subNav=[
					['title'=>'商户查询','url'=>'#','active'=>true],
					['title'=>'注册商户','url'=>'/Template?tpl=storeMgr1.php'],
				];
				$pagelist=$this->getTemplatePageBtns(0,0);
				break;
			case 'storeMgr1.php':
				$headerTitle='商户管理';
				$subNav=[
					['title'=>'商户查询','url'=>'/Template?tpl=storeMgr.php'],
					['title'=>'注册商户','url'=>'#','active'=>true],
				];
				break;
			case 'storeMgr2.php':
				$headerTitle='商户详情';
				break;
			case 'storeMgr3.php':
				$headerTitle='商户管理';
				$subNav=[
					['title'=>'商户查询','url'=>'/Template?tpl=storeMgr.php'],
					['title'=>'编辑商户','url'=>'#','active'=>true],
				];
				break;
			case 'grouping.php':
				$headerTitle='商户分组';
				$subNav=[
					['title'=>'分组列表', 'url'=>'#', 'active'=>true],
					['title'=>'添加分组', 'url'=>'/Template?tpl=grouping1.php'],
				];
				break;
			case 'grouping1.php':
				$headerTitle='添加分组';
				$subNav=[
					['title'=>'分组列表', 'url'=>'/Template?tpl=grouping.php'],
					['title'=>'分组列表', 'url'=>'#', 'active'=>true],
				];
				break;
			case 'grouping2.php':
				$headerTitle='添加分组';
				$subNav=[
					['title'=>'分组列表', 'url'=>'/Template?tpl=grouping.php'],
					['title'=>'编辑分组', 'url'=>'#', 'active'=>true],
				];
				break;
			case 'orderQuery.php':
				$headerTitle='订单查询';
				$subNav=[
					['title'=>'批量订单查询', 'url'=>'#', 'active'=>true],
					['title'=>'按订单号查询', 'url'=>'/Template?tpl=orderQuery1.php'],
				];
				$pagelist=$this->getTemplatePageBtns(0,0);
				break;
			case 'orderQuery1.php':
				$headerTitle='按订单号查询';
				$subNav=[
					['title'=>'批量订单查询', 'url'=>'/Template?tpl=orderQuery.php'],
					['title'=>'按订单号查询', 'url'=>'/Template?tpl=orderQuery1.php', 'active'=>true],
				];
				break;
			case 'orderQuery2.php':
				$headerTitle='查看订单明细';
				break;
			case 'payConfig.php':
				$headerTitle='支付方式配置';
				$subNav=[
					['title'=>'已有支付方式', 'url'=>'#', 'active'=>true],
					['title'=>"添加支付方式", 'url'=>'/Template?tpl=payConfig1.php'],
				];
				break;
			case 'payConfig1.php':
				$headerTitle='支付方式配置';
				$subNav=[
					['title'=>'已有支付方式', 'url'=>'/Template?tpl=payConfig.php'],
					['title'=>'添加支付方式', 'url'=>'#', 'active'=>true],
				];
				break;
			case 'payConfig2.php':
				$headerTitle='支付方式配置';
				$subNav=[
					['title'=>'已有支付方式', 'url'=>'/Template?tpl=payConfig.php'],
					['title'=>'配置支付方式', 'url'=>'#', 'active'=>true],
				];
				break;
			case 'payConfig3.php':
				$headerTitle='支付方式配置';
				$subNav=[
					['title'=>'已有支付方式', 'url'=>'/Template?tpl=payConfig.php'],
					['title'=>'添加支付方式', 'url'=>'#', 'active'=>true],
				];
				break;
			case 'cashing.php':
				$headerTitle='提现管理';
				$pagelist=$this->getTemplatePageBtns(0,0);
				break;
			case 'cashing1.php':
				$headerTitle='提现审核';
				break;
			case 'cashing2.php':
				$headerTitle='提现审核详情';
				break;
			case 'denominate.php':
				$headerTitle='结算管理';
				$pagelist=$this->getTemplatePageBtns(0,0);
				break;
			case 'denominate1.php':
				$headerTitle='已结算明细';
				$pagelist=$this->getTemplatePageBtns(0,0);
				break;
			case 'apiFrequency.php':
				$headerTitle='接口调用量';
				$subNav=[
					['title'=>'调用量总览', 'url'=>'#', 'active'=>true],
					['title'=>'按商户查询', 'url'=>'/Template?tpl=apiFrequency1.php'],
				];
				break;
			case 'apiFrequency1.php':
				$headerTitle='接口调用量';
				$subNav=[
					['title'=>'调用量总览', 'url'=>'/Template?tpl=apiFrequency.php'],
					['title'=>'按商户查询', 'url'=>'#', 'active'=>true],
				];
				$pagelist=$this->getTemplatePageBtns(0,0);
				break;
			case 'currency.php':
				$headerTitle='流水统计';
				$pagelist=$this->getTemplatePageBtns(0,0);
				break;
			case 'currency1.php':
				$headerTitle='流水详情';
				$pagelist=$this->getTemplatePageBtns(0,0);
				break;
			case 'statics.php':
				$headerTitle='订单统计';
				$pagelist=$this->getTemplatePageBtns(0,0);
				break;
			case 'statics1.php':
				$headerTitle='订单统计详情';
				$pagelist=$this->getTemplatePageBtns(0,0);
				break;
			case 'adminMgr.php':
				$headerTitle='管理员管理';
				$subNav=[
					['title'=>'管理员列表', 'url'=>'#', 'active'=>true],
					['title'=>'添加管理员', 'url'=>'/Template?tpl=adminMgr1.php'],
				];
				break;
			case 'adminMgr1.php':
				$headerTitle='管理员管理';
				$subNav=[
					['title'=>'管理员列表', 'url'=>'/Template?tpl=adminMgr.php'],
					['title'=>'添加管理员', 'url'=>'#', 'active'=>true],
				];
				break;
			case 'adminMgr2.php':
				$headerTitle='管理员管理';
				$subNav=[
					['title'=>'管理员列表', 'url'=>'/Template?tpl=adminMgr.php'],
					['title'=>'	编辑管理员', 'url'=>'#', 'active'=>true],
				];
				break;
			case 'groupingMgr.php':
				$headerTitle='管理组';
				$subNav=[
					['title'=>'管理组列表', 'url'=>'#', 'active'=>true],
					['title'=>'添加管理组', 'url'=>'/Template?tpl=groupingMgr1.php'],
				];
				break;
			case 'groupingMgr1.php':
				$headerTitle='管理组';
				$subNav=[
					['title'=>'管理组列表', 'url'=>'/Template?tpl=groupingMgr.php'],
					['title'=>'添加管理组', 'url'=>'#', 'active'=>true],
				];
				break;
			case 'groupingMgr2.php':
				$headerTitle='管理组';
				$subNav=[
					['title'=>'管理组列表', 'url'=>'/Template?tpl=groupingMgr.php'],
					['title'=>'添加管理组', 'url'=>'#', 'active'=>true],
				];
				break;
			case 'limitMgr.php':
				$headerTitle='权限管理';
				$subNav=[
					['title'=>'后台权限', 'url'=>'#', 'active'=>true],
					['title'=>'商户权限', 'url'=>'/Template?tpl=limitMgr1.php'],
				];
				break;
			case 'limitMgr1.php':
				$headerTitle='权限管理';
				$subNav=[
					['title'=>'后台权限', 'url'=>'/Template?tpl=limitMgr.php'],
					['title'=>'商户权限', 'url'=>'#', 'active'=>true],
				];
				break;
			case 'backgroundMenu.php':
				$headerTitle='后台菜单';
				$subNav=[
					['title'=>'菜单查询', 'url'=>'#', 'active'=>true],
					['title'=>'添加菜单', 'url'=>'/Template?tpl=backgroundMenu1.php'],
					['title'=>'菜单分组', 'url'=>'/Template?tpl=backgroundMenu2.php'],
					['title'=>'添加分组', 'url'=>'/Template?tpl=backgroundMenu3.php'],
				];
				break;
			case 'backgroundMenu1.php':
				$headerTitle='后台菜单';
				$subNav=[
					['title'=>'菜单查询', 'url'=>'/Template?tpl=backgroundMenu.php'],
					['title'=>'添加菜单', 'url'=>'#', 'active'=>true],
					['title'=>'菜单分组', 'url'=>'/Template?tpl=backgroundMenu2.php'],
					['title'=>'添加分组', 'url'=>'/Template?tpl=backgroundMenu3.php'],
				];
				break;
			case 'backgroundMenu2.php':
				$headerTitle='后台菜单';
				$subNav=[
					['title'=>'菜单查询', 'url'=>'/Template?tpl=backgroundMenu.php'],
					['title'=>'添加菜单', 'url'=>'/Template?tpl=backgroundMenu1.php'],
					['title'=>'菜单分组', 'url'=>'#', 'url'=>'#', 'active'=>true],
					['title'=>'添加分组', 'url'=>'/Template?tpl=backgroundMenu3.php'],
				];
				break;
			case 'backgroundMenu3.php':
				$headerTitle='后台菜单';
				$subNav=[
					['title'=>'菜单查询', 'url'=>'/Template?tpl=backgroundMenu.php'],
					['title'=>'添加菜单', 'url'=>'/Template?tpl=backgroundMenu1.php'],
					['title'=>'菜单分组', 'url'=>'/Template?tpl=backgroundMenu2.php'],
					['title'=>'添加分组', 'url'=>'#', 'active'=>true],
				];
				break;
			case 'backgroundMenu4.php':
				$headerTitle='后台菜单';
				$subNav=[
					['title'=>'菜单查询', 'url'=>'/Template?tpl=backgroundMenu.php'],
					['title'=>'编辑菜单', 'url'=>'#', 'active'=>true],
					['title'=>'菜单分组', 'url'=>'/Template?tpl=backgroundMenu2.php'],
					['title'=>'添加分组', 'url'=>'/Template?tpl=backgroundMenu3.php'],
				];
				break;
			case 'backgroundMenu5.php':
				$headerTitle='后台菜单';
				$subNav=[
					['title'=>'菜单查询', 'url'=>'/Template?tpl=backgroundMenu.php'],
					['title'=>'编辑菜单', 'url'=>'/Template?tpl=backgroundMenu1.php'],
					['title'=>'菜单分组', 'url'=>'/Template?tpl=backgroundMenu2.php'],
					['title'=>'编辑分组', 'url'=>'#', 'active'=>true],
				];
				break;
			case 'storeMenu.php': 
				$headerTitle='商户菜单';
				$subNav=[
					['title'=>'菜单查询', 'url'=>'#', 'active'=>true],
					['title'=>'添加菜单', 'url'=>'/Template?tpl=storeMenu1.php'],
					['title'=>'菜单分组', 'url'=>'/Template?tpl=storeMenu2.php'],
					['title'=>'添加分组', 'url'=>'/Template?tpl=storeMenu3.php'],
				];
				break;
			case 'storeMenu1.php': 
				$headerTitle='商户菜单';
				$subNav=[
					['title'=>'菜单查询', 'url'=>'/Template?tpl=storeMenu.php'],
					['title'=>'添加菜单', 'url'=>'#', 'active'=>true],
					['title'=>'菜单分组', 'url'=>'/Template?tpl=storeMenu2.php'],
					['title'=>'添加分组', 'url'=>'/Template?tpl=storeMenu3.php'],
				];
				break;	
			case 'storeMenu2.php': 
				$headerTitle='商户菜单';
				$subNav=[
					['title'=>'菜单查询', 'url'=>'Template?tpl=storeMenu.php'],
					['title'=>'添加菜单', 'url'=>'Template?tpl=storeMenu1.php'],
					['title'=>'菜单分组', 'url'=>'#', 'active'=>true],
					['title'=>'添加分组', 'url'=>'Template?tpl=storeMenu3.php'],
				];
				break;
			case 'storeMenu3.php': 
				$headerTitle='商户菜单';
				$subNav=[
					['title'=>'菜单查询', 'url'=>'Template?tpl=storeMenu.php'],
					['title'=>'添加菜单', 'url'=>'Template?tpl=storeMenu1.php'],
					['title'=>'菜单分组', 'url'=>'Template?tpl=storeMenu2.php'],
					['title'=>'添加分组', 'url'=>'#', 'active'=>true],
				];
				break;
			case 'storeMenu4.php': 
				$headerTitle='商户菜单';
				$subNav=[
					['title'=>'菜单查询', 'url'=>'Template?tpl=storeMenu.php'],
					['title'=>'编辑菜单', 'url'=>'#', 'active'=>true],
					['title'=>'菜单分组', 'url'=>'Template?tpl=storeMenu2.php'],
					['title'=>'添加分组', 'url'=>'Template?tpl=storeMenu3.php'],
				];
				break;
			case 'storeMenu5.php': 
				$headerTitle='商户菜单';
				$subNav=[
					['title'=>'菜单查询', 'url'=>'Template?tpl=storeMenu.php'],
					['title'=>'编辑菜单', 'url'=>'Template?tpl=storeMenu1.php'],
					['title'=>'菜单分组', 'url'=>'Template?tpl=storeMenu2.php'],
					['title'=>'编辑分组', 'url'=>'#', 'active'=>true],
				];
				break;

		}
		$this->setTemplateNav($headerTitle,$subNav,$topNavSelectIndex,$leftMenuSelectIndex);
		$this->display($tpl,[
			'pagelist'=>$pagelist
		]);
		return;
	}
}